<!DOCTYPE html>



  


<html class="theme-next mist use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />















  
  
  <link href="/blog/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />




  
  
  
  

  
    
    
  

  

  

  

  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






<link href="/blog/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/blog/css/main.css?v=5.1.2" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="教程," />








  <link rel="shortcut icon" type="image/x-icon" href="/blog/favicon.ico?v=5.1.2" />






<meta name="description" content="前言或许是对默认的东西没有好感，总觉得默认的主题是很丑很丑的，完美控是接受不了这个东东的，还好hexo是可以修改主题的。这里首推NexT主题，精于心，简于形标语说的是真的不错。使用NexT主题的人比较多，这也说明这个主题确实很成熟了。优化，配置，扩展很多都集成了，比较简单。博文重质量，弄的太花哨确实没啥用。。。 读者可以在https://hexo.io/themes/可以查看你喜欢的主题。 这里我">
<meta name="keywords" content="教程">
<meta property="og:type" content="article">
<meta property="og:title" content="2018最新版Hexo博客Next主题6.0配置优化">
<meta property="og:url" content="http://yoursite.com/2018/09/18/主题/index.html">
<meta property="og:site_name" content="沙漠的勇者">
<meta property="og:description" content="前言或许是对默认的东西没有好感，总觉得默认的主题是很丑很丑的，完美控是接受不了这个东东的，还好hexo是可以修改主题的。这里首推NexT主题，精于心，简于形标语说的是真的不错。使用NexT主题的人比较多，这也说明这个主题确实很成熟了。优化，配置，扩展很多都集成了，比较简单。博文重质量，弄的太花哨确实没啥用。。。 读者可以在https://hexo.io/themes/可以查看你喜欢的主题。 这里我">
<meta property="og:locale" content="zh-Hans">
<meta property="og:image" content="http://yoursite.com/images/27.png">
<meta property="og:image" content="http://yoursite.com/images/28.png">
<meta property="og:image" content="http://yoursite.com/images/29.gif">
<meta property="og:image" content="http://yoursite.com/images/30.png">
<meta property="og:image" content="http://yoursite.com/images/31.png">
<meta property="og:image" content="http://yoursite.com/images/32.png">
<meta property="og:image" content="http://yoursite.com/images/33.png">
<meta property="og:image" content="http://yoursite.com/images/34.png">
<meta property="og:image" content="http://yoursite.com/images/35.png">
<meta property="og:image" content="http://yoursite.com/images/36.png">
<meta property="og:image" content="http://yoursite.com/images/37.png">
<meta property="og:image" content="http://yoursite.com/images/38.png">
<meta property="og:image" content="http://yoursite.com/images/39.png">
<meta property="og:updated_time" content="2018-09-28T01:16:44.725Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="2018最新版Hexo博客Next主题6.0配置优化">
<meta name="twitter:description" content="前言或许是对默认的东西没有好感，总觉得默认的主题是很丑很丑的，完美控是接受不了这个东东的，还好hexo是可以修改主题的。这里首推NexT主题，精于心，简于形标语说的是真的不错。使用NexT主题的人比较多，这也说明这个主题确实很成熟了。优化，配置，扩展很多都集成了，比较简单。博文重质量，弄的太花哨确实没啥用。。。 读者可以在https://hexo.io/themes/可以查看你喜欢的主题。 这里我">
<meta name="twitter:image" content="http://yoursite.com/images/27.png">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/blog/',
    scheme: 'Mist',
    sidebar: {"position":"left","display":"post","offset":12,"offset_float":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: true,
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://yoursite.com/2018/09/18/主题/"/>





  <title>2018最新版Hexo博客Next主题6.0配置优化 | 沙漠的勇者</title>
  














</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail ">
    <div class="headband">
    <a href="https://github.com/" class="github-corner" aria-label="View source on Github"><svg width="80" height="80" viewBox="0 0 250 250" style="fill:#fff; color:#151513; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style>
    </div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/blog/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">沙漠的勇者</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle"></p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/blog/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/blog/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/blog/tags/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/blog/2018/09/18/主题/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="xz_strive">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/blog/images/avatar.gif">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="沙漠的勇者">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">2018最新版Hexo博客Next主题6.0配置优化</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2018-09-18T17:51:52+08:00">
                2018-09-18
              </time>
            

            

            
          </span>

          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <h3 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h3><p>或许是对默认的东西没有好感，总觉得默认的主题是很丑很丑的，完美控是接受不了这个东东的，还好hexo是可以修改主题的。这里首推NexT主题，精于心，简于形标语说的是真的不错。使用NexT主题的人比较多，这也说明这个主题确实很成熟了。优化，配置，扩展很多都集成了，比较简单。博文重质量，弄的太花哨确实没啥用。。。</p>
<p>读者可以在<a href="https://hexo.io/themes/可以查看你喜欢的主题。" target="_blank" rel="noopener">https://hexo.io/themes/可以查看你喜欢的主题。</a> 这里我主要说下NexT主题的相关配置。其他主题可以多看看官方文档。</p>
<h3 id="安装主题"><a href="#安装主题" class="headerlink" title="安装主题"></a>安装主题</h3><p>安装的过程就一行代码，你需要在博客根目录出打开命令行输入以下命令：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">git clone --branch v5.1.2 https://github.com/iissnan/hexo-theme-next themes/next</span><br></pre></td></tr></table></figure>
<p>以上代码的意思是从 <a href="https://github.com/iissnan/hexo-theme-next" target="_blank" rel="noopener">https://github.com/iissnan/hexo-theme-next</a>  将next下载到当前目录下的themes里面的next文件夹中。</p>
<h3 id="启动主题"><a href="#启动主题" class="headerlink" title="启动主题"></a>启动主题</h3><p>修改站点配置文件_config.yml</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"># Extensions</span><br><span class="line">## Plugins: https://hexo.io/plugins/</span><br><span class="line">## Themes: https://hexo.io/themes/</span><br><span class="line">theme: next</span><br></pre></td></tr></table></figure>
<a id="more"></a>
<h3 id="主题设定"><a href="#主题设定" class="headerlink" title="主题设定"></a>主题设定</h3><p>选择 Scheme</p>
<p>Scheme 是 NexT 提供的一种特性，借助于 Scheme，NexT 为你提供多种不同的外观。同时，几乎所有的配置都可以 在 Scheme 之间共用。目前 NexT 支持三种 Scheme，他们是：</p>
<p>Muse - 默认 Scheme，这是 NexT 最初的版本，黑白主调，大量留白<br>Mist - Muse 的紧凑版本，整洁有序的单栏外观<br>Pisces - 双栏 Scheme，小家碧玉似的清新<br>Gemini - 左侧网站信息及目录，块+片段结构布局<br>cheme 的切换通过更改 主题配置文件，搜索 scheme 关键字。 你会看到有四行 scheme 的配置，将你需用启用的 scheme 前面注释 # 去除即可。</p>
<h3 id="设置-语言"><a href="#设置-语言" class="headerlink" title="设置 语言"></a>设置 语言</h3><p>编辑站点配置文件， 将 language 设置成你所需要的语言。建议明确设置你所需要的语言，例如选用简体中文，配置如下：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">language: zh-Hans</span><br></pre></td></tr></table></figure>
<p>PS：这里提一下，你使用hexo s预览的时候，你会发现是设置了语言之后界面还是英文，这个时候不要慌，使用hexo clean清理下database文件夹以及public文件夹就行了。然后再使用hexo s 预览。事实上，这个方法在遇到很多问题的时候都是通用的。</p>
<h3 id="设置-菜单"><a href="#设置-菜单" class="headerlink" title="设置 菜单"></a>设置 菜单</h3><p>菜单配置包括三个部分，第一是菜单项（名称和链接），第二是菜单项的显示文本，第三是菜单项对应的图标。 NexT 使用的是 Font Awesome 提供的图标， Font Awesome 提供了 600+ 的图标，可以满足绝大的多数的场景，同时无须担心在 Retina 屏幕下 图标模糊的问题。</p>
<p>编辑 主题配置文件，修改以下内容：</p>
<p>设定菜单内容，对应的字段是 menu。 菜单内容的设置格式是：item name: link。其中 item name 是一个名称，这个名称并不直接显示在页面上，它将用于匹配图标以及翻译。</p>
<h3 id="设置标签、分类的界面"><a href="#设置标签、分类的界面" class="headerlink" title="设置标签、分类的界面"></a>设置标签、分类的界面</h3><p>设置菜单那里，我设置了显示标签、分类、关于几个选项。如图： </p>
<p><img src="/2018/09/18/主题/../../../../images/27.png" alt="s"></p>
<p>但是点击进去，却报错：Cannot GET /tags/，不要慌，不能获取tags，创建一个就OK！</p>
<p>这里介绍创建page的语法<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">hexo new page &apos;name&apos; # name分别为tags、categories</span><br></pre></td></tr></table></figure></p>
<p>这样就创建了pages。<br>在控制台输入以下命令：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">hexo new page &apos;tags&apos; #创建tags子目录</span><br><span class="line">hexo new page &apos;categories&apos; #创建categories子目录</span><br></pre></td></tr></table></figure>
<p>在你的网站根目录下面的source文件夹会分别生成tags、categories以及about文件夹。</p>
<p>分别修改这tags和categories文件夹中的index.md文件，新增type属性，如下：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">---</span><br><span class="line">title: tags</span><br><span class="line">date: 2018-01-04 11:45:41</span><br><span class="line">type: tags</span><br><span class="line">---</span><br></pre></td></tr></table></figure>
<p>categories的修改类似。</p>
<p>当你新建一篇博文的时候，增加上tags和categories属性值，就能在tags和categories界面检索到你的文章了。</p>
<h3 id="个性化定制"><a href="#个性化定制" class="headerlink" title="个性化定制"></a>个性化定制</h3><h4 id="添加fork-me-on-github"><a href="#添加fork-me-on-github" class="headerlink" title="添加fork me on github"></a>添加fork me on github</h4><p>在<a href="http://tholman.com/github-corners/或者https://github.com/blog/273-github-ribbons选择合适的样式复制代码到themes/next/layout/_layout.swig，在" target="_blank" rel="noopener">http://tholman.com/github-corners/或者https://github.com/blog/273-github-ribbons选择合适的样式复制代码到themes/next/layout/_layout.swig，在</a><div class="headband"></div>下面：</p>
<p><img src="/2018/09/18/主题/../../../../images/28.png" alt="28"></p>
<h4 id="动态背景"><a href="#动态背景" class="headerlink" title="动态背景"></a>动态背景</h4><p>实现效果之一： </p>
<p><img src="/2018/09/18/主题/../../../../images/29.gif" alt="28"></p>
<p>目前NexT主题最新的是V6.0版本，这个版本中可以有4种动态背景：</p>
<p>Canvas-nest</p>
<p>three_waves</p>
<p>canvas_lines</p>
<p>canvas_sphere</p>
<p>设置方法也很简单，直接设置里需要的动态背景为true。</p>
<h4 id="点击出现桃心效果"><a href="#点击出现桃心效果" class="headerlink" title="点击出现桃心效果"></a>点击出现桃心效果</h4><p>浏览器输入：<a href="http://7u2ss1.com1.z0.glb.clouddn.com/love.js" target="_blank" rel="noopener">http://7u2ss1.com1.z0.glb.clouddn.com/love.js</a></p>
<p>拷贝所有代码，在/themes/next/source/js/src里面新建love.js，然后在\themes\next\layout_layout.swig文件末尾添加以下代码：</p>
<!-- 页面点击小红心 --> 
<script type="text/javascript" src="/js/src/love.js"></script>

<h4 id="文章底部带-号的标签"><a href="#文章底部带-号的标签" class="headerlink" title="文章底部带#号的标签"></a>文章底部带#号的标签</h4><p>去掉文章后面的标签前面的#号。</p>
<p>修改模板/themes/next/layout/_macro/post.swig，搜索 rel=”tag”&gt;#，将#换成<i class="fa fa-tag"></i></p>
<h4 id="在每篇文章末尾统一添加“本文结束”标记"><a href="#在每篇文章末尾统一添加“本文结束”标记" class="headerlink" title="在每篇文章末尾统一添加“本文结束”标记"></a>在每篇文章末尾统一添加“本文结束”标记</h4><p>在路径 \themes\next\layout_macro 中新建 passage-end-tag.swig 文件,并添加以下内容：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">&lt;div&gt;</span><br><span class="line">&#123;% if not is_index %&#125;</span><br><span class="line">    &lt;div style=&quot;text-align:center;color: #ccc;font-size:14px;&quot;&gt;-------------本文结束&lt;i class=&quot;fa fa-paw&quot;&gt;&lt;/i&gt;感谢您的阅读-------------&lt;/div&gt;</span><br><span class="line">&#123;% endif %&#125;</span><br><span class="line">&lt;/div&gt;</span><br></pre></td></tr></table></figure>
<p>接着打开\themes\next\layout_macro\post.swig文件，在post-body 之后， 添加以下代码：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">&lt;div&gt;</span><br><span class="line">&#123;% if not is_index %&#125;</span><br><span class="line">&#123;% include &apos;passage-end-tag.swig&apos; %&#125;</span><br><span class="line">&#123;% endif %&#125;</span><br><span class="line">&lt;/div&gt;</span><br></pre></td></tr></table></figure>
<p>添加位置如图：</p>
<p><img src="/2018/09/18/主题/../../../../images/30.png" alt="30"></p>
<p>然后打开主题配置文件（_config.yml),在末尾添加</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"># 文章末尾添加“本文结束”标记</span><br><span class="line">passage_end_tag:</span><br><span class="line">enabled: true</span><br></pre></td></tr></table></figure>
<p>完成以上设置之后，在每篇文章之后都会添加如上效果图的样子。</p>
<h4 id="侧边栏社交小图标设置"><a href="#侧边栏社交小图标设置" class="headerlink" title="侧边栏社交小图标设置"></a>侧边栏社交小图标设置</h4><p>实现效果： </p>
<p><img src="/2018/09/18/主题/../../../../images/31.png" alt="31"></p>
<p>打开主题配置文件_config.yml，搜索social:, ||之后是在图标库中对应的图标。注意空格就行。</p>
<p><img src="/2018/09/18/主题/../../../../images/32.png" alt="31"></p>
<p>图标库链接：<a href="http://fontawesome.io/icons/" target="_blank" rel="noopener">http://fontawesome.io/icons/</a></p>
<h4 id="主页文章加阴影"><a href="#主页文章加阴影" class="headerlink" title="主页文章加阴影"></a>主页文章加阴影</h4><p>具体实现方法<br>打开\themes\next\source\css_custom\custom.styl,向里面加入：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">// 主页文章添加阴影效果</span><br><span class="line">.post &#123;</span><br><span class="line">margin-top: 60px;</span><br><span class="line">margin-bottom: 60px;</span><br><span class="line">padding: 25px;</span><br><span class="line">-webkit-box-shadow: 0 0 5px rgba(202, 203, 203, .5);</span><br><span class="line">-moz-box-shadow: 0 0 5px rgba(202, 203, 204, .5);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h4 id="添加热度"><a href="#添加热度" class="headerlink" title="添加热度"></a>添加热度</h4><p>具体实现方法<br>next主题集成leanCloud，打开/themes/next/layout/_macro/post.swig</p>
<p>在<span class="leancloud-visitors-count"></span>下添加一句：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">&lt;span&gt;℃&lt;/span&gt;</span><br></pre></td></tr></table></figure>
<p>然后打开，/themes/next/languages/zh-Hans.yml</p>
<p>将visitors: 阅读次数改为visitors: 热度</p>
<h4 id="设置网站图标"><a href="#设置网站图标" class="headerlink" title="设置网站图标"></a>设置网站图标</h4><p>默认的网站图标是一个N，当然是需要制定一个图了，在网上找到图后，将其放在/themes/next/source/images里面，然后在主题配置文件中修改下图所示图片位置</p>
<p><img src="/2018/09/18/主题/../../../../images/33.png" alt="33"></p>
<p>还有一些就不详细说了，另外注意下好多的东西已经过时了。比如next主题已经换了域了。很多教程还停留在3.0时代，但是现在next的版本是V6.0，截止我这篇教程发布的时期。</p>
<h4 id="设置文章浏览数（热度）"><a href="#设置文章浏览数（热度）" class="headerlink" title="设置文章浏览数（热度）"></a>设置文章浏览数（热度）</h4><p><img src="/2018/09/18/主题/../../../../images/34.png" alt="34"></p>
<p>如上图所示</p>
<p>首先需要在<a href="https://leancloud.cn/" target="_blank" rel="noopener">leancloud</a>上注册一个账号，注册的过程省略。</p>
<p><img src="/2018/09/18/主题/../../../../images/35.png" alt="35"></p>
<p>点击访问控制台</p>
<p>点击创建应用 </p>
<p><img src="/2018/09/18/主题/../../../../images/36.png" alt="35"></p>
<p>这里选择开发版就行，应用名称随意。</p>
<p>随后进入设置界面</p>
<p><img src="/2018/09/18/主题/../../../../images/37.png" alt="35"><br><img src="/2018/09/18/主题/../../../../images/38.png" alt="35"></p>
<p>在next主题的配置文件中填写以下信息：</p>
<p><img src="/2018/09/18/主题/../../../../images/39.png" alt="35"></p>
<p>随后在主题文件的languages目录下找到你设置的语言yml下，把visitors后面的字符改为热度，到此大功告成。</p>
<h3 id="总结"><a href="#总结" class="headerlink" title="总结"></a>总结</h3><p>这篇文章就只是简单的介绍了下NexT主题，关于这个主题呢，要达到个性化定制的话，还是需要再花点功夫的。还有就是这个hexo s预览效果确实不好，修改了网站内容之后，需要重新hexo clean再hexo s才能看到效果，有同样问题的兄dei就不需要担心自己的修改是错的。</p>

      
    </div>
    
    
    
    <div>
      
      <div>

    <div style="text-align:center;color: #ccc;font-size:14px;">-------------本文结束<i class="fa fa-paw"></i>感谢您的阅读-------------</div>

</div>
      
    </div>
    

    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/blog/tags/教程/" rel="tag"><i class="fa fa-tag"></i> 教程</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/blog/2018/09/18/使用Hexo+Github一步步搭建属于自己的博客（基础）/" rel="next" title="使用Hexo+ Github 一步步搭建属于自己的博客（基础）">
                <i class="fa fa-chevron-left"></i> 使用Hexo+ Github 一步步搭建属于自己的博客（基础）
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/blog/2018/09/28/前端面试问题/" rel="prev" title="2018最全前端面试问题及答案总结">
                2018最全前端面试问题及答案总结 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          
  <div class="comments" id="comments">
    
  </div>


        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap" >
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
          <img class="site-author-image" itemprop="image"
               src="/blog/images/avatar.gif"
               alt="xz_strive" />
          <p class="site-author-name" itemprop="name">xz_strive</p>
           
              <p class="site-description motion-element" itemprop="description"></p>
          
        </div>
        <nav class="site-state motion-element">

          
            <div class="site-state-item site-state-posts">
              <a href="/blog/archives/">
                <span class="site-state-item-count">10</span>
                <span class="site-state-item-name">日志</span>
              </a>
            </div>
          

          

          
            
            
            <div class="site-state-item site-state-tags">
              <a href="/blog/tags/index.html">
                <span class="site-state-item-count">5</span>
                <span class="site-state-item-name">标签</span>
              </a>
            </div>
          

        </nav>

        

        <div class="links-of-author motion-element">
          
        </div>

        
        

        
        

        


      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-3"><a class="nav-link" href="#前言"><span class="nav-number">1.</span> <span class="nav-text">前言</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#安装主题"><span class="nav-number">2.</span> <span class="nav-text">安装主题</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#启动主题"><span class="nav-number">3.</span> <span class="nav-text">启动主题</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#主题设定"><span class="nav-number">4.</span> <span class="nav-text">主题设定</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#设置-语言"><span class="nav-number">5.</span> <span class="nav-text">设置 语言</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#设置-菜单"><span class="nav-number">6.</span> <span class="nav-text">设置 菜单</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#设置标签、分类的界面"><span class="nav-number">7.</span> <span class="nav-text">设置标签、分类的界面</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#个性化定制"><span class="nav-number">8.</span> <span class="nav-text">个性化定制</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#添加fork-me-on-github"><span class="nav-number">8.1.</span> <span class="nav-text">添加fork me on github</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#动态背景"><span class="nav-number">8.2.</span> <span class="nav-text">动态背景</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#点击出现桃心效果"><span class="nav-number">8.3.</span> <span class="nav-text">点击出现桃心效果</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#文章底部带-号的标签"><span class="nav-number">8.4.</span> <span class="nav-text">文章底部带#号的标签</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#在每篇文章末尾统一添加“本文结束”标记"><span class="nav-number">8.5.</span> <span class="nav-text">在每篇文章末尾统一添加“本文结束”标记</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#侧边栏社交小图标设置"><span class="nav-number">8.6.</span> <span class="nav-text">侧边栏社交小图标设置</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#主页文章加阴影"><span class="nav-number">8.7.</span> <span class="nav-text">主页文章加阴影</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#添加热度"><span class="nav-number">8.8.</span> <span class="nav-text">添加热度</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#设置网站图标"><span class="nav-number">8.9.</span> <span class="nav-text">设置网站图标</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#设置文章浏览数（热度）"><span class="nav-number">8.10.</span> <span class="nav-text">设置文章浏览数（热度）</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#总结"><span class="nav-number">9.</span> <span class="nav-text">总结</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy; 
  <span itemprop="copyrightYear">2018</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">xz_strive</span>
</div>


<div class="powered-by">
  由 <a class="theme-link" href="https://hexo.io">Hexo</a> 强力驱动
</div>

<div class="theme-info">
  主题 -
  <a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">
    NexT.Mist
  </a>
</div>


        

        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  




  
  









  
  <script type="text/javascript" src="/blog/lib/jquery/index.js?v=2.1.3"></script>

  
  <script type="text/javascript" src="/blog/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>

  
  <script type="text/javascript" src="/blog/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  
  <script type="text/javascript" src="/blog/lib/velocity/velocity.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/blog/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/blog/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>

  
  <script type="text/javascript" src="/blog/lib/three/three.min.js"></script>

  
  <script type="text/javascript" src="/blog/lib/three/three-waves.min.js"></script>


  


  <script type="text/javascript" src="/blog/js/src/utils.js?v=5.1.2"></script>

  <script type="text/javascript" src="/blog/js/src/motion.js?v=5.1.2"></script>



  
  

  
  <script type="text/javascript" src="/blog/js/src/scrollspy.js?v=5.1.2"></script>
<script type="text/javascript" src="/blog/js/src/post-details.js?v=5.1.2"></script>



  


  <script type="text/javascript" src="/blog/js/src/bootstrap.js?v=5.1.2"></script>



  


  




	





  





  






  





  

  

  

  

  

  

</body>
</html>
<!-- 页面点击小红心 --> 
<script type="text/javascript" src="/js/src/love.js"></script>
